Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent AV in processinfo2 while suspended #55379

Merged
merged 1 commit into from
Jul 12, 2021

Conversation

josalem
Copy link
Contributor

@josalem josalem commented Jul 9, 2021

fix #54083

This patch attempts to avoid an AV that can occur if the ProcessInfo2 Diagnostics IPC command is sent while the runtime is suspended.

If the main entrypoint assembly is null, the command will return the empty string.

CC @tommcdon @jander-msft

@josalem josalem added this to the 6.0.0 milestone Jul 9, 2021
@josalem josalem requested review from jander-msft and a team July 9, 2021 00:47
@josalem josalem self-assigned this Jul 9, 2021
@ghost
Copy link

ghost commented Jul 9, 2021

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details

fix #54083

This patch attempts to avoid an AV that can occur if the ProcessInfo2 Diagnostics IPC command is sent while the runtime is suspended.

If the main entrypoint assembly is null, the command will return the empty string.

CC @tommcdon @jander-msft

Author: josalem
Assignees: josalem
Labels:

area-Diagnostics-coreclr

Milestone: 6.0.0

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@josalem
Copy link
Contributor Author

josalem commented Jul 12, 2021

Heads up @jander-msft, after I look at the CI failures, I'm going to merge this.

Copy link
Member

@jander-msft jander-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it's great that the AV is fixed, I will be logging another issue for ManagedEntrypointAssemblyName being null/empty while the process is suspended. This has the effect of making the entrypoint name a useless capability of filtering processes when deciding whether to start event pipe sessions or to apply profilers at startup while the process is suspended.

@josalem josalem merged commit e544ccf into dotnet:main Jul 12, 2021
@josalem josalem deleted the dev/josalem/processinfo2-suspend-fix branch July 12, 2021 20:02
@ghost ghost locked as resolved and limited conversation to collaborators Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ProcessInfo2 diagnostic pipe command can crash runtime instance if requested too early.
4 participants